import { createApp } from 'vue'
import JumpDialog from '@/components/common/JumpDialog.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
/**
 * 调出延迟跳转窗口
 * @param {String} message - 窗口显示消息.
 * @param {String} pathName - router路径名称.
 * @param {String} pathNowName - 当前router路径名称，直接使用this.&route.name获取
 * @param {Number} time - 跳转延迟时间（秒）.
 * @param {String} title -窗口标题
 */
export function jumpTo(message, pathName,pathNowName,time,title) {
    const div = document.createElement('div');
	document.body.appendChild(div)
    const app = createApp(JumpDialog,{   //第二个参数就是传递的属性,
		message,
        pathName,
        pathNowName,
        time,
        title,
	});
	app.use(ElementPlus)
	app.mount(div)

}
